import request from '@/utils/request'
import { tradeApi } from '@/utils/comm'

// 查询佣金提现列表
export function listBrokerageWithdraw(query) {
  return request({
    url: `${tradeApi}/brokerageWithdraw/list`,
    method: 'get',
    params: query
  })
}

// 查询佣金提现详细
export function getBrokerageWithdraw(id) {
  return request({
    url: `${tradeApi}/brokerageWithdraw/` + id,
    method: 'get'
  })
}

// 通过审核
export function approve(data) {
  return request({
    url: `${tradeApi}/brokerageWithdraw/approve`,
    method: 'put',
    data
  })
}

// 驳回申请
export function reject(data) {
  return request({
    url: `${tradeApi}/brokerageWithdraw/reject`,
    method: 'put',
    data
  })
}

// 编辑提现单
export function brokerageWithdrawEdit(data) {
  return request({
    url: `${tradeApi}/brokerageWithdraw/edit`,
    method: 'put',
    data
  })
}

// 重新转账
export function retryTransfer(data) {
  return request({
    url: `${tradeApi}/brokerageWithdraw/retryTransfer`,
    method: 'put',
    data
  })
}